#include<cstdio>//uncle-lu

int main()
{
	int n, ans, sum;
	scanf("%d",&n);

	ans = 0;
	sum = 1;

	for(int i=1;i<=n;++i)
	{
		sum = sum * i;
		ans = ans + sum;
	}

	printf("%d",ans);

	return 0;
}
